<?php
    //引入数据库操作类
    require './lib/common.class.php';
    $db = database();
    //插入数据
    $rows = $db->select('category');
    //var_dump($rst);
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="public/css/bootstrap.css">
    <script src="public/js/bootstrap.js" type="text/javascript"></script>
    <script src="public/js/jquery.min.js" type="text/javascript"></script>
    <title>文章分类列表页面</title>
    <style>
        #list th,#list td{
            vertical-align: middle;
            text-align: center;
        }
        body{
            padding-top: 70px;
        }
    </style>
</head>
<body>
    <nav class="navbar navbar-inverse navbar-fixed-top">
        <div class="container-fluid">
            <div class="navbar-header">
                <a href="#" class="navbar-brand" style="paddin-top:10px;">
                    <img src="public/img/g.jpg" alt="" style="max-height: 30px;">
                </a>
            </div>

            <div class="collapse navbar-collapse" id="bs-examp;e-navbar-collapse-l">
                    <ul class="nav navbar-nav">
                        <li><a href="article_category_list.php">文章分类</a></li>
                        <li><a href="article_list.php">文章列表</a></li>
                    </ul>
                    <ul class="nav navbar-nav navbar-right">
                        <li class="dropdpwn">
                            <a href="#" class="dropdown-toggle" data-toggle="dropdown">Sandy<span class="caret"></span></a>
                            <ul class="dropdown-menu">
                                <li><a href="#">用户中心</a></li>
                                <li><a href="#">退出</a></li>
                            </ul>
                        </li>
                    </ul>
                </div>
        </div>
    </nav>
    <div class="container">
        <div class="alert alert-danger alert-dismissible">
            <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                <span aria-hidden="true">&times;</span>
            </button>
            <strong>Warning!</strong> 隔壁老王在摇一摇，请看好自己的老婆。<a href="http://www.itsource.cn/" target="_blank">www.itsource.cn</a>
        </div>
    </div>
    <div class="container" id="list">
        <a href="article_category_add.php" class="btn btn-success" style="margin-bottom:10px;">添加分类</a>
        <table class="table table-bordered table-striped text-center">
            <tr>
                <th>分类编号</th>
                <th>分类缩略图<span class="glyphicon glyphicon-picture" aria-hidden="true"></span></th>
                <th>分类名称</th>
                <th>分类英文名</th>
                <th>分类排序</th>
                <th>操作</th>
            </tr>
            <tr>
                <td>1</td>
                <td><img src="public/img/g.jpg" class="img-circle" style="max-height:30px;"></td>
                <td>公示公告</td>
                <td>Notice</td>
                <td>5</td>
                <td><a href="#" class="btn btn-primary btn-sm glyphicon glyphicon-pencil"> 编辑</a> <a href="#" class="btn btn-danger btn-sm glyphicon glyphicon-trash"> 删除</a></td>
            </tr>
            <tr>
                <td>2</td>
                <td><img src="public/img/g1.jpg" class="img-circle" style="max-height:30px;"></td>
                <td>文件通知</td>
                <td>Document</td>
                <td>4</td>
                <td><a href="#" class="btn btn-primary btn-sm glyphicon glyphicon-pencil"> 编辑</a> <a href="#" class="btn btn-danger btn-sm glyphicon glyphicon-trash"> 删除</a></td>
            </tr>
            <tr>
                <td>3</td>
                <td><img src="public/img/g2.jpg" class="img-circle" style="max-height:30px;"></td>
                <td>焦点新闻</td>
                <td>Focus News</td>
                <td>3</td>
                <td><a href="#" class="btn btn-primary btn-sm glyphicon glyphicon-pencil"> 编辑</a> <a href="#" class="btn btn-danger btn-sm glyphicon glyphicon-trash"> 删除</a></td>
            </tr>
            <tr>
                <td>4</td>
                <td><img src="public/img/g3.png" class="img-circle" style="max-height:30px;"></td>
                <td>行业动态</td>
                <td>Industry Dynamics</td>
                <td>2</td>
                <td><a href="#" class="btn btn-primary btn-sm glyphicon glyphicon-pencil"> 编辑</a> <a href="#" class="btn btn-danger btn-sm glyphicon glyphicon-trash"> 删除</a></td>
            </tr>
            <tr>
                <td>5</td>
                <td><img src="public/img/g4.png" class="img-circle" style="max-height:30px;"></td>
                <td>机关党建</td>
                <td>Party building</td>
                <td>1</td>
                <td><a href="#" class="btn btn-primary btn-sm glyphicon glyphicon-pencil"> 编辑</a> <a href="#" class="btn btn-danger btn-sm glyphicon glyphicon-trash"> 删除</a></td>
            </tr>
        </table>
    </div>
</body>
</html>